import request from '@/utils/request'
// 文件上传
export function upload(data) {
  return request({
    url: `/sysm/files/upload`,
    method: 'post',
    data: data
  })
}
// 平台
export function platform(query) {
  return request({
    url: '/sysm/platform/list',
    method: 'get',
    params: query
  })
}
// 模块
export function treeList(query) {
  return request({
    url: '/sysm/module/treeList',
    method: 'get',
    params: query
  })
}

// 用户
export function user(query) {
  return request({
    url: '/sysm/user/listPage',
    method: 'get',
    params: query
  })
}

// 字典列表
export function dictionary(query) {
  return request({
    url: '/sysm/dictionary/list',
    method: 'get',
    params: query
  })
}

// 当前公司
export function current(param) {
  return request.put('/sysm/user/update/current/company', JSON.stringify(param))
}

// 公司列表
export function company(query) {
  return request({
    url: '/sysm/user/get/company',
    method: 'get',
    params: query
  })
}

// 用户名
export function name(query) {
  return request({
    url: '/sysm/user/get/name',
    method: 'get',
    params: query
  })
}

// 查询全部公司
export function companyAll(query) {
  return request({
    url: '/sysm/company/list',
    method: 'get',
    params: query
  })
}

// 公司
export function companyli(query) {
  return request({
    url: '/sysm/company/listByTree',
    method: 'get',
    params: query
  })
}
// 部门
export function deptList(query) {
  return request({
    url: '/sysm/dept/treeList',
    method: 'get',
    params: query
  })
}

// 职工
export function staffName(query) {
  return request({
    url: '/sysm/employee/listPage',
    method: 'get',
    params: query
  })
}
